home *** CD-ROM | disk | FTP | other *** search
- Path: loki.tor.hookup.net!news
- From: Rajendra_Singh@msn.com (Rajendra Singh)
- Newsgroups: comp.lang.c
- Subject: Re: Is This Bad Coding Practice?
- Date: Sat, 30 Mar 1996 20:21:25 GMT
- Organization: HookUp Communication Corporation, Oakville, Ontario, CANADA
- Message-ID: <4jjqf1$6c1@loki.tor.hookup.net>
- References: <4jgnt2$9d1@loki.tor.hookup.net> <828135115snz@genesis.demon.co.uk>
- NNTP-Posting-Host: u36u400.tor.hookup.net
- NNTP-Posting-User: u36u400
- X-Newsreader: Forte Free Agent 1.0.82
-
- Lawrence Kirby <fred@genesis.demon.co.uk> wrote:
-
- >No, as soon as func1 returns test doesn't exist any more so you cannot
- >safely access it (doing so results in undefined behaviour). Don't
- >do it, even if it seems to work on your system - it will bite you, sooner
- >rather than later if you're lucky.
-
- I was working with a company and one of the senior programmers had
- this piece of code in production. When I questioned him about it, he
- says that it will always work. I had my doubts, that's why I was
- curious as to whether or not it would always work.
-
- By the way, the forementioned piece of code worked on AIX, SCO, HPUX,
- and OS/2.
- ---
- Rajendra Singh, B. Sc. (Rajendra_Singh@msn.com)
- "What is understood need not be discussed." - Loren Adams
-
-